//index.js
//获取应用实例
const app = getApp()

Page({
  data: {
    tabbar: {},
    remark_show:false,
    modelOprate:"modelOprate",
  },
  showModel(){
    this.setData({
      remark_show:true
    })
  },
  modelOprate(e){
    console.log(e);
    let type = e.type;
    let btnType = e.target.dataset.type;
    if(btnType=="modelOut") {
      this.setData({
        remark_show:false
      });
      return;
    }
    if(type=="input"){
      this.data.content = e.detail.value;
      return;
    }
    if(btnType!=null){
      if(btnType=="sure"){
        console.log("点击了确定");
        console.log("输入框的内容是："+this.data.content);
      }else if(btnType=="cancel"){
        console.log("点击了取消");
      }
      this.setData({
        remark_show:false
      })
    }
    
  },
  onLoad: function () {
    app.editTabbar();
    
  }
})
